package com.graduation.community_manager.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.graduation.community_manager.entity.CmHouseEntity;
import com.graduation.community_manager.vo.PageCmHouseVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 用户住房表
 *
 * @author wdh
 */
@Mapper
public interface CmHouseDao extends BaseMapper<CmHouseEntity> {

//    @Select({"<script>",
//            "SELECT * FROM cm_house",
//            "<where>",
//            "<if test='vo.userName != null'>",
//            "AND user_name = #{vo.userName}",
//            "</if>",
//            "<if test='vo.building != null'>",
//            "AND building = #{vo.building}",
//            "</if>",
//            "<if test='vo.unit != null'>",
//            "AND unit = #{vo.unit}",
//            "</if>",
//            "</where>",
//            "</script>"})
    List<CmHouseEntity> getCmHouseInfoList(@Param("vo") PageCmHouseVO vo);
}
